package com.leenmvc.core.security.entity.core;

import com.leenmvc.core.annotation.DbInfo;
import com.leenmvc.core.annotation.PrimaryKey;
import com.leenmvc.core.base.BaseEntity;
import com.leenmvc.core.security.entity.export.LogErrorExcel;
import com.leenmvc.core.utils.logger.LogEntity;

import java.util.Date;

/**
 * 异常日志实体
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2019-12-24
 */

@DbInfo(value = "sys_log_error", excelEntity = LogErrorExcel.class, comment = "错误日志")
public class SysLogError  extends BaseEntity implements LogEntity {

    @PrimaryKey
    private Long id;
    /**
     *
     */
	private String requestUri;
    /**
     *
     */
	private String requestMethod;
    /**
     *
     */
	private String requestParams;
    /**
     *
     */
	private String userAgent;
    /**
     *
     */
	private String ip;
    /**
     *
     */
	private String errorInfo;

	private Long creator;

	private Date createDate;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getRequestUri() {
        return requestUri;
    }

    public void setRequestUri(String requestUri) {
        this.requestUri = requestUri;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public String getRequestParams() {
        return requestParams;
    }

    public void setRequestParams(String requestParams) {
        this.requestParams = requestParams;
    }

    public String getUserAgent() {
        return userAgent;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getErrorInfo() {
        return errorInfo;
    }

    public Long getCreator() {
        return creator;
    }

    public void setCreator(Long creator) {
        this.creator = creator;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public void setErrorInfo(String errorInfo) {
        this.errorInfo = errorInfo;
    }

    @Override
    public SysLogError clean() {
        this.id = null;
        this.requestUri = null;
        this.requestMethod = null;
        this.requestParams = null;
        this.userAgent = null;
        this.ip = null;
        this.errorInfo = null;
        return this;
    }
}
